#!/usr/bin/python3

import copy

a = [1,2,3]
b = a
a[1]=77
b[0] = 99
print(a)
print(b)

aa=[1,2,3,a]
bb=copy.copy(aa)
aa[0]=111
bb[2]=222
aa[3].append(100)
print(aa)
print(bb)

aaa=[1,2,3,a]
bbb=copy.deepcopy(aaa)
aaa[0]=111
bbb[2]=222
bbb[3].append(1000)
print(aaa)
print(bbb)

dd={1:'a',2:'b'}
ee=dd.copy()
dd[1]='aaa'
ee[2]='bbb'
print(dd)
print(ee)

# 结果：
a=[99, 77, 3]
b=[99, 77, 3]
aa=[111, 2, 3, [99, 77, 3, 100]]
bb=[1, 2, 222, [99, 77, 3, 100]]
aaa=[111, 2, 3, [99, 77, 3, 100]]
bbb=[1, 2, 222, [99, 77, 3, 100, 1000]]
dd={1: 'aaa', 2: 'b'}
ee={1: 'a', 2: 'bbb'}

